#ifndef INCLUDED_JVM
#define INCLUDED_JVM

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

HX_DECLARE_CLASS0(Hash)
HX_DECLARE_CLASS0(JAttribute)
HX_DECLARE_CLASS0(JClass)
HX_DECLARE_CLASS0(JConstant)
HX_DECLARE_CLASS0(JObject)
HX_DECLARE_CLASS0(JVM)
HX_DECLARE_CLASS0(JValue)
HX_DECLARE_CLASS1(haxe,Public)
HX_DECLARE_CLASS2(haxe,io,Bytes)
HX_DECLARE_CLASS2(haxe,io,BytesInput)
HX_DECLARE_CLASS2(haxe,io,Input)


class JVM_obj : public hx::Object{
	public:
		typedef hx::Object super;
		typedef JVM_obj OBJ_;
		JVM_obj();
		Void __construct();

	public:
		static hx::ObjectPtr< JVM_obj > __new();
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		~JVM_obj();

		HX_DO_RTTI;
		static void __boot();
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		::String __ToString() const { return HX_CSTRING("JVM"); }

		static ::Hash classes; /* REM */ 
		static ::Hash externs; /* REM */ 
		static int resolveRef( ::JConstant c);
		static Dynamic resolveRef_dyn();

		static ::JClass readClass( ::haxe::io::BytesInput b);
		static Dynamic readClass_dyn();

		static ::JAttribute readAttribute( Array< ::JConstant > pool,::haxe::io::BytesInput i);
		static Dynamic readAttribute_dyn();

		static Dynamic toNativeValue( ::JValue v);
		static Dynamic toNativeValue_dyn();

		static Void runClass( ::String name);
		static Dynamic runClass_dyn();

		static Void init( );
		static Dynamic init_dyn();

		static Void main( );
		static Dynamic main_dyn();

		static ::JValue toValue( ::JConstant c,Array< ::JConstant > pool);
		static Dynamic toValue_dyn();

		static ::JValue exec( ::JClass c,::haxe::io::Bytes b,Dynamic lvars);
		static Dynamic exec_dyn();

		static ::JValue fromNativeValue( Dynamic d);
		static Dynamic fromNativeValue_dyn();

		static ::JValue solveMethodRef( ::JValue obj,Array< ::JConstant > pool,::JConstant method,Array< ::JValue > args);
		static Dynamic solveMethodRef_dyn();

};


#endif /* INCLUDED_JVM */ 
